<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Prevents priority inversion</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="eventconfig.requirefeatures.html">EventConfig::requireFeatures</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="class.eventdnsbase.html">EventDnsBase</a></div>
 <div class="up"><a href="class.eventconfig.html">EventConfig</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="eventconfig.setmaxdispatchinterval" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">EventConfig::setMaxDispatchInterval</h1>
  <p class="verinfo">(No version information available, might only be in Git)</p><p class="refpurpose"><span class="refname">EventConfig::setMaxDispatchInterval</span> &mdash; <span class="dc-title">Prevents priority inversion</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-eventconfig.setmaxdispatchinterval-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="type"><span class="type void">void</span></span> 
   <span class="methodname"><strong>EventConfig::setMaxDispatchInterval</strong></span>
    ( <span class="methodparam">
    <span class="type">int</span>
     <code class="parameter">$max_interval</code>
   </span>
   , <span class="methodparam">
    <span class="type">int</span>
     <code class="parameter">$max_callbacks</code>
   </span>
   , <span class="methodparam">
    <span class="type">int</span>
     <code class="parameter">$min_priority</code>
   </span>
   )</div>

  <p class="para rdfs-comment">
   Prevents priority inversion by limiting how many low-priority event
   callbacks can be invoked before checking for more high-priority events.
  </p>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <p class="para">
    Available since
    <em>libevent 2.1.0-alpha</em>
    .
   </p>
  </p></blockquote>
 </div>

 <div class="refsect1 parameters" id="refsect1-eventconfig.setmaxdispatchinterval-parameters">
  <h3 class="title">参数</h3>
  <dl>

   
    <dt>

     <em><code class="parameter">max_interval</code></em>
    </dt>

    <dd>

     <p class="para">
      An interval after which Libevent should stop running callbacks and check
      for more events, or
      <strong><code>0</code></strong>
      , if there should be no such interval.
     </p>
    </dd>

   
   
    <dt>

     <em><code class="parameter">max_callbacks</code></em>
    </dt>

    <dd>

     <p class="para">
      A number of callbacks after which Libevent should stop running callbacks
      and check for more events, or
      <strong><code>-1</code></strong>
      , if there should be no such limit.
     </p>
    </dd>

   
   
    <dt>

     <em><code class="parameter">min_priority</code></em>
    </dt>

    <dd>

     <p class="para">
      A priority below which
      <em><code class="parameter">max_interval</code></em>
      and
      <em><code class="parameter">max_callbacks</code></em>
      should not be enforced. If this is set to
      <strong><code>0</code></strong>
      , they are enforced for events of every priority; if it&#039;s set to
      <strong><code>1</code></strong>
      , they&#039;re enforced for events of priority
      <strong><code>1</code></strong>
      and above, and so on.
     </p>
    </dd>

   
  </dl>

 </div>

 <div class="refsect1 returnvalues" id="refsect1-eventconfig.setmaxdispatchinterval-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns <strong><code>TRUE</code></strong> on success, otherwise <strong><code>FALSE</code></strong>.
  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="eventconfig.requirefeatures.html">EventConfig::requireFeatures</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="class.eventdnsbase.html">EventDnsBase</a></div>
 <div class="up"><a href="class.eventconfig.html">EventConfig</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
